import request from '..'
// 1. 文章评论
// 发表文章评论
const articleCommentRequest = async (article_id, content) => {
  const result = await request({
    method: 'post',
    url: '/comment/article',
    data: {
      article_id,
      content,
    },
  })
  return result
}
// 回复评论
const replyCommentRequest = async (article_id, comment_id, content) => {
  const result = await request({
    method: 'post',
    url: '/comment/article/reply',
    data: {
      article_id,
      comment_id,
      content,
    },
  })
  return result
}

// 2. 说说评论
// 发表说说评论
const messageCommentRequest = async (content, message_id) => {
  const result = await request({
    method: 'post',
    url: '/comment/message',
    data: {
      content,
      message_id,
    },
  })
  return result
}
// 回复评论
const messageReplyRequest = async (content, message_id, comment_id) => {
  const result = await request({
    method: 'post',
    url: '/comment/message/reply',
    data: {
      content,
      message_id,
      comment_id,
    },
  })
  return result
}
export {
  articleCommentRequest,
  replyCommentRequest,
  messageCommentRequest,
  messageReplyRequest,
}
